package com.solution.admin.customer.dao.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.solution.admin.customer.dao.CustomerCustomFieldDao;
import com.solution.admin.customer.entity.CustomerCustomFieldEntity;
import com.solution.common.dao.impl.BaseDaoImpl;
import com.solution.common.page.PageBean;
import com.solution.common.page.PageParam;

/**
 * 客户属性自定义DAO实现
 * @author solin
 * @date 2017-09-27 09:19:24
 */
@Repository
public class CustomerCustomFieldDaoImpl extends BaseDaoImpl<CustomerCustomFieldEntity> implements CustomerCustomFieldDao {

	/**
	 * 保存客户属性自定义信息
	 * @param customerCustomFieldEntity
	 * @return
	 * @author solin
	 * @date 2017-09-27 09:19:24
	 */
	@Override
	public long saveCustomerCustomField(CustomerCustomFieldEntity customerCustomFieldEntity) {
		return super.insert(customerCustomFieldEntity);
	}

	/**
	 * 分页查询客户属性自定义信息
	 * @param pageParam 分页对象
	 * @param customerCustomField 分页参数
	 * @return PageBean 分页参数及数据
	 * @author solin
	 * @date 2017-09-27 09:19:24
	 */
	public PageBean listCustomerCustomFieldPage(PageParam pageParam, Map<String, Object> param) {
		return super.listPage(pageParam, param);
	}

	/**
	 * 更新客户属性自定义
	 * @param customerCustomFieldEntity
	 * @return
	 * @author solin
	 * @date 2017-09-27 09:19:24
	 */
	@Override
	public int updateCustomerCustomField(CustomerCustomFieldEntity customerCustomFieldEntity) {
		return super.update(customerCustomFieldEntity);
	}

	/**
	 * 删除客户属性自定义
	 * @param customerCustomFieldId
	 * @return
	 * @author solin
	 * @date 2017-09-27 09:19:24
	 */
	public int deleteCustomerCustomFieldById( Long id) {
		return super.deleteById(id);
	}
	
	/**
	 * 根据条件查询客户属性自定义
	 * @param param
	 * @return
	 * @author solin
	 * @date 2017-09-27 09:19:24
	 */
	@Override
	public List<CustomerCustomFieldEntity> listCustomerCustomField( Map<String, Object> param) {
		return super.listBy(param);
	}
}
